﻿using System;

using System.Web;

namespace ASP_Web_Interface.Account
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RegisterHyperLink.NavigateUrl = "Register.aspx?ReturnUrl=" +
                                            HttpUtility.UrlEncode(Request.QueryString["ReturnUrl"]);
        }

        protected void LoginButton_Click(object sender, EventArgs e)
        {
            //if (ViewStateMode.Equals(IsValid))
            //{
            //    //    if (Membership.ValidateUser(LoginUser.UserName, LoginUser.Password))
            //    //    {

            //    WebService service = new WebService();

            //    bool sucesss = service.Login(LoginUser.UserName, LoginUser.Password);

            //    if (sucesss)
            //    {
            //        FormsAuthentication.SetAuthCookie(LoginUser.UserName, false);

            //        Session["UserName"] = LoginUser.UserName;
            //        Response.Redirect("~/User/WebForm.aspx");
            //    }
            //    else
            //    {
            //        Session["UserName"] = null;
            //        LoginUser.FailureText = "The user name or password provided is incorrect.";
            //    }

            //}
        }


    }
}

